-- GENERATED SPELL FOR [Spitting Scarab] --


function spell0_15462(pUnit, Event) --@Acid Spit,n/a--
pUnit:FullCastSpellOnTarget(24334,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15462', 2000, 1)
end

function spell1_15462(pUnit, Event) --@Berserker Charge,n/a--
pUnit:FullCastSpellOnTarget(22886,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15462', 668, 1)
end

function Sorts_15462(pUnit, Event)
local choix_sorts_15462 = math.random(0, 1)
if choix_sorts_15462 == 0 then
pUnit:RegisterEvent('spell0_15462', 1, 1)
end
if choix_sorts_15462 == 1 then
pUnit:RegisterEvent('spell1_15462', 1, 1)
end
end

function mob15462_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15462', math.random(1500, 3000), 1)
end

function mob15462_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15462_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15462_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15462, 1, 'mob15462_Action')
RegisterUnitEvent(15462, 2, 'mob15462_Leave')
RegisterUnitEvent(15462, 3, 'mob15462_Kill')
RegisterUnitEvent(15462, 4, 'mob15462_Die')
